/**
 * $Id: TestEngineer.java 87 2012-12-28 09:10:08Z Denis.Skalsky@gmail.com $S
 */
package com.globallogic.skalskyy.javabasic.valstaff;

/**
 * TestEngineer stores info of software tester.
 * @author $Author: Denis.Skalsky@gmail.com $
 * @version $Revision: 87 $
 */
public class TestEngineer extends Employee {

	/** Type of tester */
	private Field<String> type = new Field<String>();

	public String getType() {
		return type.getValue();
	}

	public void setType(String type) {
		this.type.setValue(type);
	}
	
	@Override
	public boolean equals(Object obj) {
		if (super.equals(obj)) {
			TestEngineer tester = (TestEngineer)obj;
			return (this.compareType(tester.getType()));
		}
		
		return false;
	}
	
	/**
	 * Check tester type for a match ignoring case
	 * @param type type for checking 
	 * @return true if matches else false
	 */
	public boolean compareType(String type) {
		return this.type.equals(new Field<String>(type));
	}
}